﻿using System;
using System.Collections.Generic;

using ExtraClub.Domain;
using ExtraClub.Domain.Entities;

using SubSonic;
using System.Web.UI;

namespace ExtraClub.Web.Forms.mail_templates {
    public partial class module : BaseUserControl {

        //protected Club CurrentClub = null;
        //protected List<MailTemplate> list = null;
        //protected int SelectedId = 0;

        protected override void OnLoad(EventArgs e) {
            base.OnLoad(e);
            ResisterJSFile("assets/js/WebService.js");
            ResisterWSFile("Modules/Forms/mail-template/module.asmx");

            //ResisterCSSFile("assets/inputex/lib/yui/container/assets/container.css");
            //ResisterCSSFile("assets/inputex/lib/yui/assets/skins/sam/skin.css");
            //ResisterCSSFile("assets/inputex/css/inputEx.css");
            //ResisterCSSFile("assets/inputex/css/inputEx-IE6.css", "<!--[if IE 6]>{0}<![endif]-->");

            //ResisterJSFile("assets/inputex/lib/yui/yahoo/yahoo-min.js");
            //ResisterJSFile("assets/inputex/lib/yui/dom/dom-min.js");
            //ResisterJSFile("assets/inputex/lib/yui/event/event-min.js");
            //ResisterJSFile("assets/inputex/lib/yui/container/container-min.js");
            //ResisterJSFile("assets/inputex/css/inputEx.css");
            //ResisterJSFile("assets/inputex/lib/yui/connection/connection-min.js");
            //ResisterJSFile("assets/inputex/lib/yui/json/json-min.js");
            //ResisterJSFile("assets/inputex/js/Field.js");
            //ResisterJSFile("assets/inputex/js/fields/StringField.js");
            //ResisterJSFile("assets/inputex/js/fields/EmailField.js");
            //ResisterJSFile("assets/inputex/js/fields/UrlField.js");
            //ResisterJSFile("assets/inputex/js/fields/SelectField.js");
            //ResisterJSFile("assets/inputex/js/fields/Textarea.js");
            //ResisterJSFile("assets/inputex/js/Group.js");
            //ResisterJSFile("assets/inputex/js/Form.js");
            ResisterJSFile("fckeditor/fckeditor.js");

            //Query q = ClubInUser.CreateQuery();
            //q.AddWhere(ClubInUser.Columns.UserId, CurrentUser.ProviderUserKey);
            //ClubInUserCollection club_in_user = new ClubInUserController().FetchByQuery(q);

            //if (club_in_user.Count > 0) {
            //    CurrentClub = club_in_user[0].Club;
            //    if (!IsPostBack) {
            //    } else {
            //        if (Request.Form["select"] != null) {
            //            SelectedId = int.Parse(Request.Form["select"]);
            //        }
            //    }
            //}
            //if (CurrentClub != null) {
            //    list = CurrentClub.MailTemplateRecords.GetList();
            //}
        }
    }
}
